package com.yvon.maple.service.base.service;

import com.yvon.boot.mybatis.IBaseService;
import com.yvon.maple.service.base.entity.FileRelate;

import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Set;

/**
 * @author : Yvon
 * @since : 2021-10-20
 */
public interface FileRelateService extends IBaseService<FileRelate> {

    /**
     * 增量保存
     *
     * @param businessKey 业务关键
     * @param fileIds     文件ID集合
     * @return boolean
     * @author : Yvon / 2021-10-20
     */
    boolean incrSave(@NotNull String businessKey, @NotNull Set<Long> fileIds);

    /**
     *  覆盖保存
     *
     * @param businessKey 业务关键
     * @param fileIds     文件ID集合
     * @return boolean
     * @author : Yvon / 2021-10-20
     */
    boolean coverSave(@NotNull String businessKey, Set<Long> fileIds);


    List<Long> getFileIdsByBusinessKeys(Set<String> businessKeys);


    List<Long> getFileIdsByBusinessKey(String businessKey);
}
